/****************************************************************************
** Form implementation generated from reading ui file 'Lista.ui'
**
** Created: Seg Abr 7 23:20:16 2008
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "Lista.h"

#include <qvariant.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

#include "../Lista.ui.h"
/*
 *  Constructs a ListaWindow as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
ListaWindow::ListaWindow( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "ListaWindow" );

    labelInserir = new QLabel( this, "labelInserir" );
    labelInserir->setGeometry( QRect( 20, 20, 50, 20 ) );
    labelInserir->setFrameShape( QLabel::NoFrame );
    labelInserir->setFrameShadow( QLabel::Plain );

    BtnPop = new QPushButton( this, "BtnPop" );
    BtnPop->setEnabled( FALSE );
    BtnPop->setGeometry( QRect( 260, 80, 110, 24 ) );

    BtnPush = new QPushButton( this, "BtnPush" );
    BtnPush->setEnabled( FALSE );
    BtnPush->setGeometry( QRect( 260, 20, 110, 24 ) );

    BtnPrevious = new QPushButton( this, "BtnPrevious" );
    BtnPrevious->setEnabled( FALSE );
    BtnPrevious->setGeometry( QRect( 20, 170, 110, 24 ) );

    EditPush = new QLineEdit( this, "EditPush" );
    EditPush->setGeometry( QRect( 73, 20, 160, 22 ) );

    BtnNext = new QPushButton( this, "BtnNext" );
    BtnNext->setEnabled( FALSE );
    BtnNext->setGeometry( QRect( 20, 130, 110, 24 ) );

    LabelShowContent = new QLabel( this, "LabelShowContent" );
    LabelShowContent->setGeometry( QRect( 40, 80, 190, 24 ) );

    BtnClear = new QPushButton( this, "BtnClear" );
    BtnClear->setGeometry( QRect( 140, 170, 118, 24 ) );

    BtnClose = new QPushButton( this, "BtnClose" );
    BtnClose->setGeometry( QRect( 270, 170, 110, 24 ) );

    BrnFind = new QPushButton( this, "BrnFind" );
    BrnFind->setGeometry( QRect( 140, 130, 118, 24 ) );
    languageChange();
    resize( QSize(389, 208).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( EditPush, SIGNAL( textChanged(const QString&) ), this, SLOT( enableBtnPush() ) );
    connect( BtnPush, SIGNAL( clicked() ), this, SLOT( push() ) );
    connect( BtnPop, SIGNAL( clicked() ), this, SLOT( pop() ) );
    connect( BtnPrevious, SIGNAL( clicked() ), this, SLOT( previous() ) );
    connect( BtnClose, SIGNAL( clicked() ), this, SLOT( close() ) );
    connect( BtnNext, SIGNAL( clicked() ), this, SLOT( next() ) );
    connect( BtnClear, SIGNAL( clicked() ), this, SLOT( clear() ) );
    init();
}

/*
 *  Destroys the object and frees any allocated resources
 */
ListaWindow::~ListaWindow()
{
    destroy();
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ListaWindow::languageChange()
{
    setCaption( tr( "Lista" ) );
    labelInserir->setText( tr( "Inserir:" ) );
    BtnPop->setText( tr( "POP!" ) );
    BtnPush->setText( tr( "PUSH!" ) );
    BtnPrevious->setText( tr( "Previous" ) );
    BtnNext->setText( tr( "Next" ) );
    LabelShowContent->setText( tr( "Lista Vazia" ) );
    BtnClear->setText( tr( "CLEAR!" ) );
    BtnClose->setText( tr( "Fechar" ) );
    BrnFind->setText( tr( "CTRL+F" ) );
}

